// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import Resource from 'vue-resource'
// import VueRouter from 'vue-router'
import VueAwesomeSwiper from 'vue-awesome-swiper'
import router from './router'
import store from './store'
import VueLazyload from 'vue-lazyload'

Vue.use(Resource)
// Vue.use(VueRouter)
Vue.use(VueLazyload , {
	preLoad: 1.3,
	error: '',
	loading: '',
	attempt: 1
})

Vue.config.productionTip = false


document.addEventListener("touchstart", function(){}, true)

/* eslint-disable no-new */
new Vue({
	el: '#app',
	store,
	router,
	components: { App },
	template: '<App/>'
})

Vue.filter('money', function (value) {
	return "￥" + (value.toFixed(2))
})


Vue.prototype.linkToPage = function(rec){
	this.$router.push({
		path:"/productshow",
		query:{
			id: rec
		},
	})
}